package com.booksystem.campuslibrarymanagementsystem;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;

import javax.sql.DataSource;

@SpringBootApplication(exclude = SecurityAutoConfiguration.class)
@ServletComponentScan
@MapperScan("com.booksystem.campuslibrarymanagementsystem.mapper") // 指定 Mapper 接口扫描路径
public class CampusLibraryManagementSystemApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext context= SpringApplication.run(CampusLibraryManagementSystemApplication.class, args);
        DataSource dataSource =(DataSource)  context.getBean("dataSource");
        System.out.println(dataSource.getClass());
    }
}
